<?php
namespace app\api\model;
use think\Config;
use think\Db;
class UsageModel extends \app\common\model\CommonModel
{
    public function write_behavior($userid,$toolid,$catid)
    {
        Db::table('usage')->insert([
            'userid'    => $userid,
            'toolid'    => $toolid,
            'catid'     => $catid,
            'event_time'=> date('Y-m-d H:i:s'),
        ]);
    }
}